package com.liuhouse.mapper;

import com.liuhouse.pojo.Menu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 菜单权限表 Mapper 接口
 * </p>
 *
 * @author liuhouse
 * @since 2024-01-27
 */
public interface MenuMapper extends BaseMapper<Menu> {

    //查询普通用户的权限信息
    List<String> selectPermsByOtherUserId(@Param("userId") Long userId);

    //查询超级管理员的路由信息(权限菜单)
    List<Menu> selectAllRouterMenu();

    //查询普通用户的路由信息(权限菜单)
    List<Menu> selectOtherRouterMenuTreeByUserId(@Param("userId") Long userId);

    List<Long> selectMenuListByRoleId(Long roleId);
}
